﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DropBottle : BaseBrokenObj
{

    public RubberDropper m_RubberDropper;
    //记录每个大步骤的初始状态
    #region
    public void SetBigStepTwo()
    {
        ResetPosition();
    }

    public void SetBigStepThree()
    {
        ResetPosition();
    }

    public void SetBigStepFour()
    {
        ResetPosition();
    }

    public void SetBigStepFive()
    {

    }
    #endregion

     public override void BrokenEffOnRestoreEvent()
    {
        base.BrokenEffOnRestoreEvent();
        m_RubberDropper.Start();
    }

    bool m_CanSetRubberDropper = true;
    private void LateUpdate()
    {
        if (!m_collider.gameObject.activeInHierarchy)
        {
            if (!m_CanSetRubberDropper) return;
            m_CanSetRubberDropper = false;
            m_RubberDropper.ResetParent();
            m_RubberDropper.OnGround();
        }
        else
        {
            m_CanSetRubberDropper = true;
        }
    }
}
